CREATE TABLE [dbo].[Member]
(
[Id] [int] NOT NULL,
[Name] [nvarchar] (50) COLLATE Arabic_CI_AS NOT NULL,
[Gender] [int] NOT NULL,
[CollegeId] [int] NOT NULL,
[UniversityId] [int] NOT NULL,
[BirthDate] [datetime] NULL,
[CvFile] [nvarchar] (max) COLLATE Arabic_CI_AS NULL,
[JoinedDate] [datetime] NOT NULL,
[AcademicYear] [nvarchar] (50) COLLATE Arabic_CI_AS NOT NULL,
[Password] [nvarchar] (max) COLLATE Arabic_CI_AS NULL,
[UserName] [nvarchar] (50) COLLATE Arabic_CI_AS NULL,
[IsActive] [bit] NOT NULL CONSTRAINT [DF_Member_IsActive] DEFAULT ((0)),
[LargeImage] [nvarchar] (max) COLLATE Arabic_CI_AS NULL,
[SmallImage] [nvarchar] (max) COLLATE Arabic_CI_AS NULL,
[CurrentPostionId] [int] NULL,
[CurrentCommitteeId] [int] NULL,
[Email] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Mobile] [nchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Phone] [nchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Member] ADD CONSTRAINT [PK_member] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Member] ADD CONSTRAINT [FK_Member_College] FOREIGN KEY ([CollegeId]) REFERENCES [dbo].[College] ([Id])
GO
ALTER TABLE [dbo].[Member] ADD CONSTRAINT [FK_Member_Committee] FOREIGN KEY ([CurrentCommitteeId]) REFERENCES [dbo].[Committee] ([Id])
GO
ALTER TABLE [dbo].[Member] ADD CONSTRAINT [FK_Member_Position] FOREIGN KEY ([CurrentPostionId]) REFERENCES [dbo].[Position] ([Id])
GO
ALTER TABLE [dbo].[Member] ADD CONSTRAINT [FK_Member_University] FOREIGN KEY ([UniversityId]) REFERENCES [dbo].[University] ([Id])
GO
